<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Region (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Region (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Region.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html" title="enum in org.apache.commons.math3.geometry.partitioning"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/geometry/partitioning/Region.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Region.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.geometry.partitioning</FONT>
<BR>
Interface Region&lt;S extends <A HREF="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</A>&gt;</H2>
<DL>
<DT><DT><B>Type Parameters:</B><DD><CODE>S</CODE> - Type of the space.</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/AbstractRegion.html" title="class in org.apache.commons.math3.geometry.partitioning">AbstractRegion</A>, <A HREF="../../../../../../org/apache/commons/math3/geometry/euclidean/oned/IntervalsSet.html" title="class in org.apache.commons.math3.geometry.euclidean.oned">IntervalsSet</A>, <A HREF="../../../../../../org/apache/commons/math3/geometry/euclidean/twod/PolygonsSet.html" title="class in org.apache.commons.math3.geometry.euclidean.twod">PolygonsSet</A>, <A HREF="../../../../../../org/apache/commons/math3/geometry/euclidean/threed/PolyhedronsSet.html" title="class in org.apache.commons.math3.geometry.euclidean.threed">PolyhedronsSet</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>Region&lt;S extends <A HREF="../../../../../../org/apache/commons/math3/geometry/Space.html" title="interface in org.apache.commons.math3.geometry">Space</A>&gt;</B></DL>
</PRE>

<P>
This interface represents a region of a space as a partition.

 <p>Region are subsets of a space, they can be infinite (whole
 space, half space, infinite stripe ...) or finite (polygons in 2D,
 polyhedrons in 3D ...). Their main characteristic is to separate
 points that are considered to be <em>inside</em> the region from
 points considered to be <em>outside</em> of it. In between, there
 may be points on the <em>boundary</em> of the region.</p>

 <p>This implementation is limited to regions for which the boundary
 is composed of several <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning"><CODE>sub-hyperplanes</CODE></A>,
 including regions with no boundary at all: the whole space and the
 empty region. They are not necessarily finite and not necessarily
 path-connected. They can contain holes.</p>

 <p>Regions can be combined using the traditional sets operations :
 union, intersection, difference and symetric difference (exclusive
 or) for the binary operations, complement for the unary
 operation.</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>3.0</DD>
<DT><B>Version:</B></DT>
  <DD>$Id: Region.java 1416643 2012-12-03 19:37:14Z tn $</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html" title="enum in org.apache.commons.math3.geometry.partitioning">Region.Location</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enumerate for the location of a point with respect to the region.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="interface in org.apache.commons.math3.geometry.partitioning">Region</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#buildNew(org.apache.commons.math3.geometry.partitioning.BSPTree)">buildNew</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;newTree)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Build a region using the instance as a prototype.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html" title="enum in org.apache.commons.math3.geometry.partitioning">Region.Location</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#checkPoint(org.apache.commons.math3.geometry.Vector)">checkPoint</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;point)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check a point with respect to the region.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#contains(org.apache.commons.math3.geometry.partitioning.Region)">contains</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="interface in org.apache.commons.math3.geometry.partitioning">Region</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;region)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check if the instance entirely contains another region.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="interface in org.apache.commons.math3.geometry.partitioning">Region</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#copySelf()">copySelf</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#getBarycenter()">getBarycenter</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the barycenter of the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#getBoundarySize()">getBoundarySize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the size of the boundary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#getSize()">getSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the size of the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#getTree(boolean)">getTree</A></B>(boolean&nbsp;includeBoundaryAttributes)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the underlying BSP tree.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#intersection(org.apache.commons.math3.geometry.partitioning.SubHyperplane)">intersection</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;sub)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the parts of a sub-hyperplane that are contained in the region.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#isEmpty()">isEmpty</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check if the instance is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#isEmpty(org.apache.commons.math3.geometry.partitioning.BSPTree)">isEmpty</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;node)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check if the sub-tree starting at a given node is empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Side.html" title="enum in org.apache.commons.math3.geometry.partitioning">Side</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#side(org.apache.commons.math3.geometry.partitioning.Hyperplane)">side</A></B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">Hyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;hyperplane)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the relative position of the instance with respect to an
 hyperplane.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="buildNew(org.apache.commons.math3.geometry.partitioning.BSPTree)"><!-- --></A><H3>
buildNew</H3>
<PRE>
<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="interface in org.apache.commons.math3.geometry.partitioning">Region</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt; <B>buildNew</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;newTree)</PRE>
<DL>
<DD>Build a region using the instance as a prototype.
 <p>This method allow to create new instances without knowing
 exactly the type of the region. It is an application of the
 prototype design pattern.</p>
 <p>The leaf nodes of the BSP tree <em>must</em> have a
 <code>Boolean</code> attribute representing the inside status of
 the corresponding cell (true for inside cells, false for outside
 cells). In order to avoid building too many small objects, it is
 recommended to use the predefined constants
 <code>Boolean.TRUE</code> and <code>Boolean.FALSE</code>. The
 tree also <em>must</em> have either null internal nodes or
 internal nodes representing the boundary as specified in the
 <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html#getTree(boolean)"><CODE>getTree</CODE></A> method).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newTree</CODE> - inside/outside BSP tree representing the new region
<DT><B>Returns:</B><DD>the built region</DL>
</DD>
</DL>
<HR>

<A NAME="copySelf()"><!-- --></A><H3>
copySelf</H3>
<PRE>
<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="interface in org.apache.commons.math3.geometry.partitioning">Region</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt; <B>copySelf</B>()</PRE>
<DL>
<DD>Copy the instance.
 <p>The instance created is completely independant of the original
 one. A deep copy is used, none of the underlying objects are
 shared (except for the underlying tree <code>Boolean</code>
 attributes and immutable objects).</p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a new region, copy of the instance</DL>
</DD>
</DL>
<HR>

<A NAME="isEmpty()"><!-- --></A><H3>
isEmpty</H3>
<PRE>
boolean <B>isEmpty</B>()</PRE>
<DL>
<DD>Check if the instance is empty.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if the instance is empty</DL>
</DD>
</DL>
<HR>

<A NAME="isEmpty(org.apache.commons.math3.geometry.partitioning.BSPTree)"><!-- --></A><H3>
isEmpty</H3>
<PRE>
boolean <B>isEmpty</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;node)</PRE>
<DL>
<DD>Check if the sub-tree starting at a given node is empty.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - root node of the sub-tree (<em>must</em> have <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="interface in org.apache.commons.math3.geometry.partitioning"><CODE>Region</CODE></A> tree semantics, i.e. the leaf nodes must have
 <code>Boolean</code> attributes representing an inside/outside
 property)
<DT><B>Returns:</B><DD>true if the sub-tree starting at the given node is empty</DL>
</DD>
</DL>
<HR>

<A NAME="contains(org.apache.commons.math3.geometry.partitioning.Region)"><!-- --></A><H3>
contains</H3>
<PRE>
boolean <B>contains</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="interface in org.apache.commons.math3.geometry.partitioning">Region</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;region)</PRE>
<DL>
<DD>Check if the instance entirely contains another region.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>region</CODE> - region to check against the instance
<DT><B>Returns:</B><DD>true if the instance contains the specified tree</DL>
</DD>
</DL>
<HR>

<A NAME="checkPoint(org.apache.commons.math3.geometry.Vector)"><!-- --></A><H3>
checkPoint</H3>
<PRE>
<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html" title="enum in org.apache.commons.math3.geometry.partitioning">Region.Location</A> <B>checkPoint</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;point)</PRE>
<DL>
<DD>Check a point with respect to the region.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>point</CODE> - point to check
<DT><B>Returns:</B><DD>a code representing the point status: either <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html#INSIDE"><CODE>Region.Location.INSIDE</CODE></A>, <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html#OUTSIDE"><CODE>Region.Location.OUTSIDE</CODE></A> or <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html#BOUNDARY"><CODE>Region.Location.BOUNDARY</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getTree(boolean)"><!-- --></A><H3>
getTree</H3>
<PRE>
<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BSPTree.html" title="class in org.apache.commons.math3.geometry.partitioning">BSPTree</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt; <B>getTree</B>(boolean&nbsp;includeBoundaryAttributes)</PRE>
<DL>
<DD>Get the underlying BSP tree.

 <p>Regions are represented by an underlying inside/outside BSP
 tree whose leaf attributes are <code>Boolean</code> instances
 representing inside leaf cells if the attribute value is
 <code>true</code> and outside leaf cells if the attribute is
 <code>false</code>. These leaf attributes are always present and
 guaranteed to be non null.</p>

 <p>In addition to the leaf attributes, the internal nodes which
 correspond to cells split by cut sub-hyperplanes may contain
 <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryAttribute.html" title="class in org.apache.commons.math3.geometry.partitioning"><CODE>BoundaryAttribute</CODE></A> objects representing
 the parts of the corresponding cut sub-hyperplane that belong to
 the boundary. When the boundary attributes have been computed,
 all internal nodes are guaranteed to have non-null
 attributes, however some <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryAttribute.html" title="class in org.apache.commons.math3.geometry.partitioning"><CODE>BoundaryAttribute</CODE></A> instances may have their <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryAttribute.html#plusInside"><CODE>plusInside</CODE></A> and <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryAttribute.html#plusOutside"><CODE>plusOutside</CODE></A> fields both null if
 the corresponding cut sub-hyperplane does not have any parts
 belonging to the boundary.</p>

 <p>Since computing the boundary is not always required and can be
 time-consuming for large trees, these internal nodes attributes
 are computed using lazy evaluation only when required by setting
 the <code>includeBoundaryAttributes</code> argument to
 <code>true</code>. Once computed, these attributes remain in the
 tree, which implies that in this case, further calls to the
 method for the same region will always include these attributes
 regardless of the value of the
 <code>includeBoundaryAttributes</code> argument.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>includeBoundaryAttributes</CODE> - if true, the boundary attributes
 at internal nodes are guaranteed to be included (they may be
 included even if the argument is false, if they have already been
 computed due to a previous call)
<DT><B>Returns:</B><DD>underlying BSP tree<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/BoundaryAttribute.html" title="class in org.apache.commons.math3.geometry.partitioning"><CODE>BoundaryAttribute</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getBoundarySize()"><!-- --></A><H3>
getBoundarySize</H3>
<PRE>
double <B>getBoundarySize</B>()</PRE>
<DL>
<DD>Get the size of the boundary.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the size of the boundary (this is 0 in 1D, a length in
 2D, an area in 3D ...)</DL>
</DD>
</DL>
<HR>

<A NAME="getSize()"><!-- --></A><H3>
getSize</H3>
<PRE>
double <B>getSize</B>()</PRE>
<DL>
<DD>Get the size of the instance.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the size of the instance (this is a length in 1D, an area
 in 2D, a volume in 3D ...)</DL>
</DD>
</DL>
<HR>

<A NAME="getBarycenter()"><!-- --></A><H3>
getBarycenter</H3>
<PRE>
<A HREF="../../../../../../org/apache/commons/math3/geometry/Vector.html" title="interface in org.apache.commons.math3.geometry">Vector</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt; <B>getBarycenter</B>()</PRE>
<DL>
<DD>Get the barycenter of the instance.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>an object representing the barycenter</DL>
</DD>
</DL>
<HR>

<A NAME="side(org.apache.commons.math3.geometry.partitioning.Hyperplane)"><!-- --></A><H3>
side</H3>
<PRE>
<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Side.html" title="enum in org.apache.commons.math3.geometry.partitioning">Side</A> <B>side</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">Hyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;hyperplane)</PRE>
<DL>
<DD>Compute the relative position of the instance with respect to an
 hyperplane.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hyperplane</CODE> - reference hyperplane
<DT><B>Returns:</B><DD>one of <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Side.html#PLUS"><CODE>Side.PLUS</CODE></A>, <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Side.html#MINUS"><CODE>Side.MINUS</CODE></A>, <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Side.html#BOTH"><CODE>Side.BOTH</CODE></A> or <A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Side.html#HYPER"><CODE>Side.HYPER</CODE></A> (the latter result can occur only if the tree
 contains only one cut hyperplane)</DL>
</DD>
</DL>
<HR>

<A NAME="intersection(org.apache.commons.math3.geometry.partitioning.SubHyperplane)"><!-- --></A><H3>
intersection</H3>
<PRE>
<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt; <B>intersection</B>(<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/SubHyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning">SubHyperplane</A>&lt;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.html" title="type parameter in Region">S</A>&gt;&nbsp;sub)</PRE>
<DL>
<DD>Get the parts of a sub-hyperplane that are contained in the region.
 <p>The parts of the sub-hyperplane that belong to the boundary are
 <em>not</em> included in the resulting parts.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sub</CODE> - sub-hyperplane traversing the region
<DT><B>Returns:</B><DD>filtered sub-hyperplane</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Region.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Hyperplane.html" title="interface in org.apache.commons.math3.geometry.partitioning"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/geometry/partitioning/Region.Location.html" title="enum in org.apache.commons.math3.geometry.partitioning"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/geometry/partitioning/Region.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Region.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
